package com.example.educationalsystem.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author zpc
 * @since 2022-12-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("file")
@ApiModel(value="File对象", description="")
public class File extends Model<File> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId("id")
    private Integer id;

    @ApiModelProperty(value = "访问文件的路径")
    @TableField("file_url")
    @ExcelProperty(value = "访问文件的路径")
    private String fileUrl;

    @ApiModelProperty(value = "上次传文件的用户名")
    @TableField("user_name")
    @ExcelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "文件标志:附件或头像图片")
    @TableField("file_tag")
    @ExcelProperty(value = "文件标志")
    private String fileTag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
